package com.csw.shuanfa.other;

import com.csw.shuanfa.entity.User;
import lombok.extern.slf4j.Slf4j;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

/**
 * @author 1
 */
@Slf4j
public class AlibabaTest {
    private static final String ASDFG = "asdfg";


    public static void main(String[] args) {
        File file = new File("C:\\Users\\1\\Desktop\\新建文件夹");
        if (!file.delete()) {

        }

        String ccc = "asdfghgfdsa";
        String s = ccc.replaceAll("s", "-");
        String aaa = null;
        aaa = "ggg";
        String bbb = "hgyu.jhp";
        /*字符串判空示范*/
        boolean bbbBoolean = bbb != null && !"".equals(bbb);
        /*字符串熟悉操作也要判空*/
        if (aaa != null) {
            String[] split = bbb.split("\\.");
        }
        String[] split = bbb.split("\\.");
        log.error("{}", bbbBoolean);
        try {
            FileInputStream in = new FileInputStream(new File(bbb));
            try {
                in.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }

    public void aaa(User user) {
        String zxc = ASDFG;
        String name = user.getName();
        String ddd = zxc + name;

    }


}
